<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class Permission_role extends Model
{
    //
	protected $table='permission_role';
	protected $fillable=['permission_id','role_id'];
	protected $hidden=[];

//	获取所有权限
	public function all_permission($roleData){
		return $this->whereIn('role_id',$roleData)->pluck('permission_id');
	}
	public function permission(){
		return $this->belongsTo('App\Model\Permission','permission_id');
	}

	//	获取该角色所有的未授权的栏目
//	public function permission($role_id){
//	}

}
